<template>
	
	<wd-tabs v-model="tab">
		<block v-for="item in Data.FeedbackTabs" :key="item">
			<wd-tab :title="item">
			</wd-tab>
		</block>
	</wd-tabs>
	
	<view class="feedback-list">
		<view class="feedback-list-li" v-for="(f,index) in Data.list">
			<text>{{f.user}}</text>
			<text>{{f.title}}</text>
			<text>{{f.value}}</text>
		</view>
	</view>

</template>

<script setup>
	import overallRequest from "@/utool/http/http.js"
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onLoad,
		onReachBottom,
		onReady
	} from "@dcloudio/uni-app"

	const Data = reactive({
		FeedbackTabs:[
			"意见反馈",
			"投诉"
		],
		page: null,
		pages: null,
		list: [],
		limit: null,
		total: null
	})
	function getFeedbackList() {
		let url = "/feedback/list"
		overallRequest(url).then(res => {
			let {data} = res 
			let {
				list,
				page,
				pages,
				total
			} = data
			Data.list = list
			Data.page = page 
			Data.limit = limit 
			Data.pages = pages
		}).catch(err => {
			console.log(err);
		})
	}
	onReady(() => {
		getFeedbackList()
	})
</script>

<style>
	.feedback-where {
		display: flex;
		padding: 20rpx 20rpx;
		border-bottom: 1px solid #c3c3c344;
	}

	.feedback-where-left {
		display: flex;
		gap: 15rpx;

	}

	.feedback-where-right {
		flex: 1;
	}

	.feedback-list {
		display: flex;
		flex-direction: column;
		background: #c3c3c344;
		gap: 15px;
		padding: 30rpx 20px;
	}

	.feedback-list-li {
		border-bottom: 18rpx solid #c3c3c344;
		display: flex;
		flex-direction: column;
		padding: 20rpx 20rpx;
		box-sizing: border-box;
		background: white;
		border-radius: 10px;
		overflow: hidden;
	}
</style>